<template>
    <div>
        <section class="products text-center">
            <div class="container">
                <h3 class="mb-4">评论列表</h3>
                <div class="row">
                    <div class="col-sm-6 col-md-3 col-product">
                        <table>
                            <tr v-for="(item, index) in commentlist">
                                <!-- 管道调用 -->
                                <td>{{ get_username(item.uid) }}：{{ item.content }}</td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </section>
    </div>
</template>

<script>
export default {
    data () {
        return {

        }
    },

    // 接收参数
    props: ['commentlist', 'myuser'],

    mounted: function () {
        
    },

    methods: {
        // 格式化用户名
        get_username: function (uid) {
            return this.myuser[uid]  
        },
    }

}
</script>

<style>
    
</style>